home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
dev
/
c
/
gedindent.lha
/
blockindent.ged
next >
Wrap
Text File
|
1994-07-16
|
820b
|
32 lines
/* $VER: 1.0, ©1994 Michael Bauer - Indent a block */
OPTIONS RESULTS /* enable return codes */
if (LEFT(ADDRESS(), 6) ~= "GOLDED") then /* not started by GoldEd ? */
address 'GOLDED.1'
'LOCK CURRENT' /* lock GUI, gain access */
OPTIONS FAILAT 6 /* ignore warnings */
SIGNAL ON SYNTAX /* ensure clean exit */
/* Name the marked block and save it */
'SAVE BLOCK NAME="dtmp:golded.indent"'
/* Indent the saved code */
SHELL
'indent -br -i4 -sob -sc -npsl -o dtmp:golded.new dtmp:golded.indent'
SHELL
'DELETE BLOCK'
'OPEN NAME="dtmp:golded.new" INSERT'
'UNLOCK' /* VERY important: unlock GUI */
EXIT
SYNTAX:
SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
'UNLOCK'
EXIT